/* 基础样式 */
body {
    background-color: #F5F7FA;
    font-family: sans-serif;
    color: #333333;
    height: 100%;
    width: 100%;
    position: relative;
    margin: 0;
}

/* 导航栏样式 */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #FFFFFF;
    color: #2E7D32;
    padding: 16px 0 16px 0;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 8px;
    padding-right: 8px;
}

.nav-button {
    color: #2E7D32;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-title {
    font-size: 1.125rem;
    font-weight: 500;
}

.nav-spacer {
    width: 24px;
}

/* 聊天内容区域 */
.chat-container {
    width: 100%;
    padding-top: 64px;
    padding-bottom: 80px;
    padding-left: 0;
    padding-right: 0;
    overflow-y: auto;
}

/* 聊天气泡 */
.chat-bubble {
    max-width: 80%;
    word-wrap: break-word;
}

.message-container {
    display: flex;
    margin-bottom: 16px;
    padding-left: 8px;
    padding-right: 8px;
}

.message-container.user {
    justify-content: flex-end;
}

.assistant-message {
    background-color: #E8F5E9;
    padding: 12px;
    border-radius: 12px;
    border-top-left-radius: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.user-message {
    background-color: #2E7D32;
    color: white !important;
    padding: 12px;
    border-radius: 12px;
    border-top-right-radius: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.user-message p {
    color: #FAFAFA;
}

/* 头像样式 */
.message-avatar {
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.assistant-avatar {
    background-color: #4CAF50;
    border-radius: 50%;
    color: white;
    margin-right: 8px;
}

.user-avatar {
    background-color: #CCCCCC;
    border-radius: 50%;
    color: #666666;
    margin-left: 8px;
}

.avatar-icon {
    width: 16px;
    height: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 消息时间 */
.message-time {
    font-size: 12px;
    margin-top: 4px;
    text-align: right;
}

.assistant-time {
    color: #777777;
}

.user-time {
    color: #E0E0E0;
}

/* 输入区域 */
.input-area {
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: #F1F8E9;
    padding: 12px 0 12px 0;
    border-top: 1px solid #E8F5E9;
}

.input-container {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding-left: 8px;
    padding-right: 8px;
}

.input-field {
    flex: 1;
    background-color: white;
    border-radius: 8px;
    padding: 8px 16px;
    margin-right: 0;
}

.input-field input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 14px;
    margin-top: 5px;
    margin-bottom: 5px;
}

.send-button {
    background-color: #2E7D32;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 20px 20px;
    cursor: pointer;
    margin-left: 8px;
}

/* 打字指示器 */
.typing-indicator {
    display: inline-block;
}

.mt-2 {
    margin-top: 8px;
}

.typing-indicator span {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #4CAF50;
    border-radius: 50%;
    margin-right: 4px;
    animation: typing 1s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.stop-button {
    background-color: rgb(239 68 68);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 20px 20px;
    cursor: pointer;
    margin-left: 8px;
}